import { MockAdapter } from '../mock-adapter';
const mock = MockAdapter.getInstance();

import Mock from 'mockjs'
const Random = Mock.Random;

// 获取全部数组
mock.onGet('./assets/json/portlet-data.json').reply((config: any) => {
    let status = MockAdapter.mockStatus(config);
    return [status,
    [
        {"type":"appde",
    "appCodeName":"Crm_lead",
    "appName":"线索/商机",
    "portletCodeName": "LeadChart",
    "portletName": "销售机会漏斗",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"CHART","componentName":"crm-lead-lead-chart-portlet"},
    {"type":"appde",
    "appCodeName":"Crm_team",
    "appName":"销售渠道",
    "portletCodeName": "MainView9_Team",
    "portletName": "销售团队信息",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"VIEW","componentName":"crm-team-main-view9-team-portlet"},
    {"type":"appde",
    "appCodeName":"Crm_team",
    "appName":"销售渠道",
    "portletCodeName": "TabExpView_Team",
    "portletName": "销售团队分页导航",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"VIEW","componentName":"crm-team-tab-exp-view-team-portlet"},
    {"type":"appde",
    "appCodeName":"Mail_message",
    "appName":"消息",
    "portletCodeName": "Event",
    "portletName": "消息事件",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"LIST","componentName":"mail-message-event-portlet"},
    {"type":"appde",
    "appCodeName":"Res_users",
    "appName":"用户",
    "portletCodeName": "BriefReport",
    "portletName": "简报看板",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"ACTIONBAR","componentName":"res-users-brief-report-portlet"},
    {"type":"appde",
    "appCodeName":"Sale_order",
    "appName":"销售订单",
    "portletCodeName": "OrderBar",
    "portletName": "销售金额",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"CHART","componentName":"sale-order-order-bar-portlet"},
    {"type":"appde",
    "appCodeName":"Res_partner",
    "appName":"客户",
    "portletCodeName": "MainView9",
    "portletName": "客户信息",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"VIEW","componentName":"res-partner-main-view9-portlet"},
    {"type":"appde",
    "appCodeName":"Res_partner",
    "appName":"客户",
    "portletCodeName": "TabExpView_Partner",
    "portletName": "客户分页导航",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"VIEW","componentName":"res-partner-tab-exp-view-partner-portlet"},
    {"type":"appde",
    "appCodeName":"Res_partner",
    "appName":"客户",
    "portletCodeName": "ToDoOrders",
    "portletName": "待处理订单",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"VIEW","componentName":"res-partner-to-do-orders-portlet"},
    {"type":"appde",
    "appCodeName":"Res_partner",
    "appName":"客户",
    "portletCodeName": "CurWeekLead",
    "portletName": "本周客户商机",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"VIEW","componentName":"res-partner-cur-week-lead-portlet"},
    {"type":"app",
    "appCodeName":"Res_users",
    "appName":"用户",
    "portletCodeName": "TeamUserList",
    "portletName": "团队成员列表",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"LIST","componentName":"app-res-users-team-user-list-portlet"},
    {"type":"app",
    "appCodeName":"Web",
    "appName":"网页端",
    "portletCodeName": "DynaPartnerExpView",
    "portletName": "客户动态导览",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"VIEW","componentName":"app-dyna-partner-exp-view-portlet"},
    {"type":"app",
    "appCodeName":"Res_partner",
    "appName":"客户",
    "portletCodeName": "Pie",
    "portletName": "客户区域分布",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"CHART","componentName":"app-res-partner-pie-portlet"},
    {"type":"app",
    "appCodeName":"Res_partner",
    "appName":"客户",
    "portletCodeName": "Trend",
    "portletName": "客户新增走势",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"CHART","componentName":"app-res-partner-trend-portlet"},
    {"type":"app",
    "appCodeName":"Res_partner",
    "appName":"客户",
    "portletCodeName": "ToDoOrders",
    "portletName": "待处理订单",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"VIEW","componentName":"app-res-partner-to-do-orders-portlet"},
    {"type":"app",
    "appCodeName":"Mail_activity",
    "appName":"活动",
    "portletCodeName": "ActivityList",
    "portletName": "活动列表",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"LIST","componentName":"app-mail-activity-activity-list-portlet"},
    {"type":"app",
    "appCodeName":"Web",
    "appName":"网页端",
    "portletCodeName": "ActivityCalendar",
    "portletName": "活动日历",
    "groupCodeName":"SimpleCat",
    "groupName":"示例分类",
    "portletTYpe":"VIEW","componentName":"app-activity-calendar-portlet"},
    {"type":"app",
    "appCodeName":"Res_users",
    "appName":"用户",
    "portletCodeName": "BriefReport",
    "portletName": "简报看板",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"ACTIONBAR","componentName":"app-res-users-brief-report-portlet"},
    {"type":"app",
    "appCodeName":"Crm_lead",
    "appName":"线索/商机",
    "portletCodeName": "LeadChart",
    "portletName": "销售机会漏斗",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"CHART","componentName":"app-crm-lead-lead-chart-portlet"},
    {"type":"app",
    "appCodeName":"Sale_order",
    "appName":"销售订单",
    "portletCodeName": "OrderBar",
    "portletName": "销售金额",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"CHART","componentName":"app-sale-order-order-bar-portlet"},
    {"type":"app",
    "appCodeName":"Mail_message",
    "appName":"消息",
    "portletCodeName": "Event",
    "portletName": "消息事件",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"LIST","componentName":"app-mail-message-event-portlet"}
    ]];
});